home *** CD-ROM | disk | FTP | other *** search
/ Day Cry / Day Cry CD.bin / oh_towns / ugoku / src.lzh / MOVDEMO / DIREC.ASM next >
Assembly Source File  |  1994-06-01  |  1KB  |  89 lines

  1. ;        Graph_lib
  2. ;
  3. ;        directory
  4. ;
  5. ;        1994  Hiroshi TODA
  6. ;
  7.  
  8.     .386p
  9.  
  10.         cseg    segment    'CODE'
  11.     assume    cs:cseg,ds:cseg
  12.  
  13. ;getCurrentDisk
  14.  
  15.     public    getCurrentDisk
  16.     db    'getCurrentDisk',14
  17. getCurrentDisk    proc    near
  18.     push    ebp
  19.     mov    ebp,esp            ; ebp <-- param area top add
  20.     push    esi
  21.     push    edi
  22.     push    ebx
  23.  
  24.     mov        ah,19h
  25.     int        21h
  26.     and        eax,0ffh
  27.  
  28.     pop    ebx
  29.     pop    edi
  30.     pop    esi
  31.     mov    esp,ebp
  32.     pop    ebp
  33.     ret
  34. getCurrentDisk    endp
  35.  
  36. ;changeCurrentDirectory(path_name_address)
  37.  
  38.     public    changeCurrentDirectory
  39.     db    'changeCurrentDirectory',22
  40. changeCurrentDirectory    proc    near
  41.     push    ebp
  42.     mov    ebp,esp            ; ebp <-- param area top add
  43.     push    esi
  44.     push    edi
  45.     push    ebx
  46.  
  47.     mov    edx,[ebp+8]        ; path
  48.     mov    ah,3bh
  49.     int    21h
  50.     jc    #c01
  51.     xor    eax,eax
  52. #c01:    and    eax,0000FFFFh
  53.  
  54.     pop    ebx
  55.     pop    edi
  56.     pop    esi
  57.     mov    esp,ebp
  58.     pop    ebp
  59.     ret
  60. changeCurrentDirectory endp
  61.  
  62. ;changeDisk(int disk)
  63.  
  64.     public    changeDisk
  65.     db    'changeDisk',10
  66. changeDisk    proc    near
  67.     push    ebp
  68.     mov    ebp,esp            ; ebp <-- param area top add
  69.     push    esi
  70.     push    edi
  71.     push    ebx
  72.  
  73.     mov    edx,[ebp+8]        ; drv
  74.     mov    ah,0eh
  75.     int    21h
  76.     xor    eax,eax
  77.  
  78.     pop    ebx
  79.     pop    edi
  80.     pop    esi
  81.     mov    esp,ebp
  82.     pop    ebp
  83.     ret
  84. changeDisk    endp
  85.  
  86.         cseg    ends
  87.     end
  88.  
  89.